package rsj.api.product;

import com.rlyy.aibase.utils.base.Box;
import com.rlyy.aibase.utils.base.TableNode;
import common.util.BoxUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import rsj.api.user.BaseLink;
import rsj.service.ProductService;

/**
 * 产品以分类的形式  输出
 */
@RestController
public class GetProdClass extends BaseLink {

    @Autowired
    private ProductService productService;

    @RequestMapping(value = "rsj_prod_class")
    public Box executeLink(Box in){

        TableNode Prod_Class = productService.getProdClass();

        return BoxUtil.successBox(in, "获取产品信息！"
                ,"Data_List", Prod_Class.toJson());
    }

}
